package com.shijie.sjoj.model.exception;

import com.shijie.sjoj.model.base.BaseException;
import lombok.extern.slf4j.Slf4j;

/**
 * 判题异常类
 *
 * @author ZSJ
 */
@Slf4j
public class JudgeException extends BaseException {

    protected JudgeException(String message) {
        super(message);
    }

    /**
     * 抛出判题异常
     *
     * @param message String 错误信息
     * @return JudgeException
     */
    public static JudgeException throwError(String message) {
        return new JudgeException(null != message ? message : EXCEPTION_DEFAULT_MESSAGE);
    }

    /**
     * 抛出判题异常
     *
     * @return JudgeException
     */
    public static JudgeException throwError() {
        return new JudgeException(EXCEPTION_DEFAULT_MESSAGE);
    }


}
